#{extends 'main.html' /} 
#{set title:'Create Relation'/}


<h1>'Create Relation'</h1>
#{if !permitted}
<h1> Sorry, You are not permitted to create relations between the entities.</h1>
#{/if}

#{else}
<div>
#{list items:remainingEntities, as:'entities'}
<div class = "Entity">
<span class = "name">
${entities.name}&nbsp;&nbsp;&nbsp;&nbsp;
</span>
<span class = "description">
${entities.description}&nbsp;&nbsp;&nbsp;&nbsp;
</span>
<h1>And add the entries you want  </h1>

#{form @Relations.createRelation(entityID,entities.id,n,d)}
name: <input type = "text" name = "n" id = "n"/><br />
description: <input type = "text" name = "d" id = "d"/><br />
<input type="submit" value = "create"> <br />
#{/form}

</div>
#{/list}
</div>

#{/else}

